/* Program to calculate the product of two numbers. */
#include <stdio.h>
int a,b,c,a1,z;
int product(int x, int y);

main()
{
    /* Input the first number */
    printf("Enter a number between 1 and 100: ");
    scanf("%d", &a);
    /* Input the second number */
    printf("Enter another number between 1 and 100: ");
    scanf("%d", &b);
    /* Calculate and display the product */
    c = product(a, b);
    printf ("%d times %d = %d\n", a, b, c);
    printf("Multiplication table for %d:\n",a);
    printf("###############################\n");
    a1=1;
    while (a1 <= b)
    {    
    z = product(a,a1);
    printf("%d x %d = %d\n",a,a1,z);
    a1=a1+1;
    }
    return 0;
}
/* Function returns the product of its two arguments */
int product(int x, int y)
{
     return (x * y);
}

